<template>
  <div class="home" :style="{ height: `${base.height}px` }">
    <div class="home-left" :style="{ height: `${base.height - 98}px` }">
      <div class="home-left-title">
        <div class="title">天气</div>
        <div class="weather-panel">
          <div class="panel-item">
            <img
              src="https://d1icd6shlvmxi6.cloudfront.net/gsc/6AGGL9/95/14/29/9514299d664f4e09b7bbdb70f0a24556/images/page1/u23.png?pageId=a3bc0d16-93b0-41de-bdec-c535a25c6f03"
            />
            <span>气温</span>
            <span>10-20度</span>
          </div>
          <div class="panel-item">
            <img
              src="https://d1icd6shlvmxi6.cloudfront.net/gsc/6AGGL9/95/14/29/9514299d664f4e09b7bbdb70f0a24556/images/page1/u21.png?pageId=a3bc0d16-93b0-41de-bdec-c535a25c6f03"
            />
            <span>气压</span>
            <span>1000KPa</span>
          </div>
          <div class="panel-item">
            <img
              src="https://d1icd6shlvmxi6.cloudfront.net/gsc/6AGGL9/95/14/29/9514299d664f4e09b7bbdb70f0a24556/images/page1/u22.png?pageId=a3bc0d16-93b0-41de-bdec-c535a25c6f03"
            />
            <span>风速</span>
            <span>10m/s</span>
          </div>
        </div>
      </div>
      <div class="home-left-title">
        <div class="title">设备状态</div>
        <div class="device-panel">
          <div class="device-item">
            <span>成像仪</span>
            <img
              src="https://d1icd6shlvmxi6.cloudfront.net/gsc/6AGGL9/95/14/29/9514299d664f4e09b7bbdb70f0a24556/images/page1/u24.png?pageId=a3bc0d16-93b0-41de-bdec-c535a25c6f03"
            />
          </div>
          <div class="device-item">
            <span>成像仪</span>
            <img
              src="https://d1icd6shlvmxi6.cloudfront.net/gsc/6AGGL9/95/14/29/9514299d664f4e09b7bbdb70f0a24556/images/page1/u24.png?pageId=a3bc0d16-93b0-41de-bdec-c535a25c6f03"
            />
          </div>
          <div class="device-item">
            <span>成像仪</span>
            <img
              src="https://d1icd6shlvmxi6.cloudfront.net/gsc/6AGGL9/95/14/29/9514299d664f4e09b7bbdb70f0a24556/images/page1/u24.png?pageId=a3bc0d16-93b0-41de-bdec-c535a25c6f03"
            />
          </div>
          <div class="device-item">
            <span>成像仪</span>
            <img
              src="https://d1icd6shlvmxi6.cloudfront.net/gsc/6AGGL9/95/14/29/9514299d664f4e09b7bbdb70f0a24556/images/page1/u25.png?pageId=a3bc0d16-93b0-41de-bdec-c535a25c6f03"
            />
          </div>
          <div class="device-item">
            <span>成像仪</span>
            <img
              src="https://d1icd6shlvmxi6.cloudfront.net/gsc/6AGGL9/95/14/29/9514299d664f4e09b7bbdb70f0a24556/images/page1/u24.png?pageId=a3bc0d16-93b0-41de-bdec-c535a25c6f03"
            />
          </div>
          <div class="device-item">
            <span>成像仪</span>
            <img
              src="https://d1icd6shlvmxi6.cloudfront.net/gsc/6AGGL9/95/14/29/9514299d664f4e09b7bbdb70f0a24556/images/page1/u24.png?pageId=a3bc0d16-93b0-41de-bdec-c535a25c6f03"
            />
          </div>
        </div>
      </div>
      <div class="home-left-title">
        <div class="title">报警状态</div>
        <div class="warning-panel">
          <div class="warning-item">
            <div class="status">正常</div>
            <div class="warning-device">声呐</div>
          </div>
          <div class="warning-item">
            <div class="status">正常</div>
            <div class="warning-device">原位成像仪</div>
          </div>
        </div>
      </div>
    </div>
    <div class="home-right" :style="{ height: `${base.height - 98}px` }">
      <div class="home-right-pop">曲线图</div>
    </div>
  </div>
</template>
<script setup>
import config from '../config';
import initData from '../common/initData.js';
const { base } = initData(config);
</script>
<style lang="scss" scoped>
.home {
  width: 100%;
  display: flex;
  justify-content: space-between;
  .home-left :nth-child(1) {
    margin-top: 0px !important;
  }
  .home-left {
    width: 20%;
    padding: 30px;
    box-sizing: border-box;
    background-repeat: no-repeat;
    background-size: contain;
    background-size: 100% 100%;
    background-image: url('https://d1icd6shlvmxi6.cloudfront.net/gsc/6AGGL9/95/14/29/9514299d664f4e09b7bbdb70f0a24556/images/page1/u9.png?pageId=a3bc0d16-93b0-41de-bdec-c535a25c6f03');
    margin-right: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .home-left-title {
      margin-top: 20px;
      background-size: 100% 100%;
      background-repeat: no-repeat;
      background-size: contain;
      background-image: url('https://d1icd6shlvmxi6.cloudfront.net/gsc/6AGGL9/95/14/29/9514299d664f4e09b7bbdb70f0a24556/images/page1/u14.png?pageId=a3bc0d16-93b0-41de-bdec-c535a25c6f03');
      .title {
        font-size: 18px;
        color: #fff;
        padding-left: 30px;
      }
      .weather-panel {
        width: 100%;
        height: 200px;
        background-color: #163988;
        border-radius: 20px;
        box-sizing: border-box;
        padding: 30px;
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        text-align: center;
        .panel-item {
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 0px 40px;
          img {
            width: 40px;
            height: 40px;
          }
          span {
            font-size: 18px;
            color: #fff;
          }
        }
      }
      .device-panel {
        width: 100%;
        height: 300px;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        background-color: #163988;
        border-radius: 20px;
        box-sizing: border-box;
        padding: 30px;
        margin-top: 20px;
        .device-item {
          width: 30%;
          text-align: center;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          span {
            color: #fff;
            font-size: 18px;
          }
        }
      }
      .warning-panel {
        display: flex;
        width: 100%;
        height: 200px;
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        background-color: #163988;
        border-radius: 20px;
        box-sizing: border-box;
        padding: 60px;
        margin-top: 20px;
        .warning-item {
          text-align: center;
          color: #fff;
          .status {
            width: 50px;
            background-color: green;
            color: #fff;
            margin: 0 auto;
            border-radius: 10px 0px 10px 0px;
            padding: 0px 6px;
          }
          .warning-device {
            margin-top: 20px;
          }
        }
      }
    }
  }
  .home-right {
    position: relative;
    flex: 1;
    background-size: cover;
    background-repeat: no-repeat;
    background-image: url('https://d1icd6shlvmxi6.cloudfront.net/gsc/6AGGL9/95/14/29/9514299d664f4e09b7bbdb70f0a24556/images/page1/u11.png?pageId=a3bc0d16-93b0-41de-bdec-c535a25c6f03');
    .home-right-pop {
      position: absolute;
      top: 200px;
      right: 400px;
    }
  }
}
</style>
